<?php
ob_start();
	include 'connect/connect.php';
		$result = mysql_query("SELECT * FROM tbl_giangvien") or die(mysql_error()); 

	echo "<table border='1' style='border-collapse: collapse' width='900'>";
echo   '<td width="170" bgcolor="#D6E0D8">ID</td>
<td width="170" bgcolor="#D6E0D8">Họ và tên</td>
<td width="170" bgcolor="#D6E0D8">Giới tính</td>
<td width="170" bgcolor="#D6E0D8">Tuổi</td>
<td width="170" bgcolor="#D6E0D8">Địa chỉ</td>
<td width="170" bgcolor="#D6E0D8">Chuyên loại hình</td>
<td width="170" bgcolor="#D6E0D8">Phần mềm sử dụng</td>
<td width="170" bgcolor="#D6E0D8">Ca</td>	
<td width="170" bgcolor="#D6E0D8">SDT</td>	
<td width="170" bgcolor="#D6E0D8">Mail</td>	
';
		
    while ($row = mysql_fetch_array($result))
    {
			  echo "<tr>";
			  echo "<td>" . $row['id'] . "</td>";
			  echo "<td>" . $row['f_hovaten'] . "</td>";			  
		   if($row['f_gioitinh'] == 1)
			   {
				echo "<td>Nam</td>";			  
			   }
			   else
			   {
				echo "<td>Nữ</td>";
			   }
			  echo "<td>" . $row['f_tuoi'] . "</td>";
			  echo "<td>" . $row['f_diachi'] . "</td>";
			  echo "<td>" . $row['f_chuyenloaihinh'] . "</td>";
			  echo "<td>" . $row['f_phanmemsudung'] . "</td>";
			  echo "<td>" . $row['f_car'] . "</td>";
			  echo "<td>" . $row['sdt'] . "</td>";
			  echo "<td>" . $row['mail'] . "</td>";
echo "<td><a href=delete.php?id={$row['id']}&tt=2>Del</a></td>";
echo "<td><a href='edit_giangvien.php?id={$row['id']}'>Edit</a></td>";
			  echo "</tr>";
    }
	
echo "</table>";
echo "<p>";
echo 'Hom nay la '.date("d-m-y");
?>